<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>个人资料</title>
		<link rel="stylesheet" href="../../resources/layui/css/layui.css" />
		<script type="text/javascript" src="../../resources/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="../../resources/layui/layui.js"></script>
		<script type="text/javascript" src="../../resources/js/moxie.js"></script>
		<script type="text/javascript" src="../../resources/js/plupload.full.min.js"></script>
		<script type="text/javascript" src="../../resources/js/qiniu.js"></script>
		<script type="text/javascript" src="../../resources/js/qiniu_img_upload.js"></script>
	</head>

	<body>
		<form class="layui-form" action="" style="margin-top: 50px;">
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-inline" style="width: 300px;"	>
					<input type="text" name="users.userName" value="whyzaa" class="layui-input  layui-disabled" disabled>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label" >角色</label>
				<div class="layui-inline" style="width: 300px;">
					<input type="text" name="users.userRoleId" value="超级管理员" class="layui-input  layui-disabled" disabled>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">手机号码</label>
				<div class="layui-inline" style="width: 300px;">
					<input type="text" name="users.userPhoto" value="1111111111" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">邮箱地址</label>
				<div class="layui-inline" style="width: 300px;">
					<input type="text" name="users.userEmail" value="123123123@qq.com" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">地址</label>
				<div class="layui-input-inline" style="width: 600px;">
					<input type="text" name="users.userAddress" value="哈哈啊哈哈哈哈哈哈" class="layui-input">
				</div>
				<div class="layui-form-mid layui-word-aux">用于兑换商品</div>

			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">修改头像</label>
				<div class="layui-input-block">
					<div id="btn-uploader">
						<span id="pickfiles" class="layui-btn layui-btn-normal">选择文件</span>
						<div class="layui-progress layui-progress-big" lay-filter="demo" lay-showPercent="true" style="background:white;position:absolute;top:9px;width: 690px;margin-left: 100px;">
							<div class="layui-progress-bar" lay-percent="0%"></div>
						</div>
					</div>
				</div>
				<div>
					<img src="" name="articleImg" class="q_img" lay-verify="articleImg" style="width: 200px;height: 130px;display:none;margin-left: 109px;margin-top: 10px;" />
					<input type="hidden" name="users." value="" id="in_hiden" />
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">签名</label>
				<div class="layui-input-block">
					<textarea name="users.userAutograph" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn layui-btn-danger" lay-submit lay-filter="formDemo">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>

		<script>
			//Demo
			layui.use('form', function() {
				var form = layui.form;

				//监听提交
				form.on('submit(formDemo)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return false;
				});
			});

			$(document).ready(function() {
				getTokenMessage();
			});

			function getTokenMessage() {
				$.ajax({
					url: '/qiniu/fileUplaod.action',
					type: 'POST',
					data: {},
					cache: false,
					contentType: false, //不可缺
					processData: false, //不可缺
					dataType: 'json',
					success: function(data) {
						var obj = data;
						uploaderReady(obj.uptoken);
					}
				});
			}
		</script>
	</body>

</html>